def HexStrBeauty(hexstr):
    beautystr=''
    length = len(hexstr)/2
    #index = 1
    for i in range(0,length):
        beautystr += hexstr[i*2:i*2+2]
        beautystr += ' '
        
    return beautystr

def HexStrFromFile(filename):
    f = open(filename, 'r')
    hexstr = f.read()
    hexstr = hexstr.replace(' ','')
    return hexstr